<?php

  require_once "JooS/Server/Route/Abstract.php";

  class JooS_Server_Route_Regexp extends JooS_Server_Route_Abstract {
    private $_rule = null;

    public function __construct($className, $rule) {
      parent::__construct($className);
      $this->_rule = $rule;
    }

    public function test(JooS_Server_Request_Abstract $request) {
      return preg_match_all($this->_rule, $request->getResourcePath(), $matches) ? true : false;
    }
  }

?>